import type { DataType } from "../types/type";
import type { IValue } from "./IValue";

export class Value implements IValue {
  constructor(
    public type: DataType,
    public content: any,
  ) {
    if (content === undefined) {
      console.warn(`创造了content为'undefined'的Value`);
    }
  }

  static default(t: DataType) {
    return new Value(t, t.default)
  }
}